﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Serialization;

namespace Client
{
    public partial class WebForm11 : System.Web.UI.Page
    {
        public string ID;
        public string name;
        public string Ava;
        protected void Page_Load(object sender, EventArgs e)
        {
            ID = Request.QueryString["ID"].ToString();
            try
            {
                name = Session["Username"].ToString();
            }
            catch(Exception ex)
            {
                name="";
            }
        }
        public string ReturnID()
        {

            return (new JavaScriptSerializer()).Serialize(ID);
        }
        public string ReturnName()
        {
            try
            {
                name = Session["Username"].ToString();
            }
            catch (Exception ex)
            {
                name = "";
            }
            return (new JavaScriptSerializer()).Serialize(name);
        }
        public string ReturnAvatar()
        {
            try
            {
                Ava = Session["Avatar"].ToString();
                return (new JavaScriptSerializer()).Serialize(Ava);
            }
            catch (Exception ex)
            {
                Ava = "" ;
                return (new JavaScriptSerializer()).Serialize(Ava);
            }
        }
    }
}